package cn.kmust.booth.portal.security;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 自定义获取登录之后的用户的信息
 * @author XChao
 * @date 2020/7/20 - 17:10
 */
@Setter
@Getter
@ToString
public class UserInfo extends User {

    private Integer jobNumber;
    private String username;
    private Integer flag;
    private String avatarUrl;
    private String city;

    public UserInfo(String phone, String password, Collection<? extends GrantedAuthority> authorities) {
        super(phone, password, authorities);
    }

    public UserInfo(String phone, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        super(phone, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
    }

}
